package org.anddev.andengine.extra;

import org.anddev.andengine.audio.sound.Sound;

import android.media.AudioManager;

public class ExtSound {
	private Sound mSound;
	
	public ExtSound(Sound sound) {
		this.mSound = sound;
	}
	
	public void play() {
		int mode = Enviroment.getInstance().getAudioManager().getRingerMode();
		
		if (mode == AudioManager.RINGER_MODE_NORMAL && Enviroment.getInstance().getAudio())
			this.mSound.play();
	}
	
}